// 自动生成模板PluginInfo
package plugin_market

import (
	"gitcode.com/G-YT/ANN/server/global"
)

// 插件信息管理 结构体  PluginInfo
type PluginInfo struct {
	global.GVA_MODEL
	Name         *string  `json:"name" form:"name" gorm:"comment:插件名称;column:name;size:255;" binding:"required"`                       //插件名称
	Description  *string  `json:"description" form:"description" gorm:"comment:插件描述;column:description;type:text;"`                    //插件描述
	Version      *string  `json:"version" form:"version" gorm:"default:1.0.0;comment:插件版本;column:version;size:50;" binding:"required"` //插件版本
	Price        *float64 `json:"price" form:"price" gorm:"default:0;comment:插件价格(元);column:price;" binding:"required"`                //插件价格
	Status       string   `json:"status" form:"status" gorm:"default:1;comment:插件状态;column:status;type:enum();" binding:"required"`    //插件状态
	Icon         string   `json:"icon" form:"icon" gorm:"comment:插件图标;column:icon;"`                                                   //插件图标
	Developer    *string  `json:"developer" form:"developer" gorm:"comment:开发者;column:developer;size:100;" binding:"required"`         //开发者
	Category     string   `json:"category" form:"category" gorm:"comment:插件分类;column:category;type:enum();" binding:"required"`        //插件分类
	InstallCount *int     `json:"install_count" form:"install_count" gorm:"default:0;comment:安装次数;column:install_count;"`              //安装次数
	Rating       *float64 `json:"rating" form:"rating" gorm:"default:5.0;comment:评分(1-5);column:rating;"`                              //评分
	CreatedBy    uint     `gorm:"column:created_by;comment:创建者"`
	UpdatedBy    uint     `gorm:"column:updated_by;comment:更新者"`
	DeletedBy    uint     `gorm:"column:deleted_by;comment:删除者"`
}

// TableName 插件信息管理 PluginInfo自定义表名 plugin_infos
func (PluginInfo) TableName() string {
	return "plugin_infos"
}
